package com.woniu40.petai_manager.mapper;

import com.woniu40.petai_manager.entity.Brand;
import com.woniu40.petai_manager.entity.ProductType;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface ProductTypeMapper {
    int insert(ProductType record);

    List<ProductType> selectAll();

    @Select("select * from t_product_type where product_type_id = #{productTypeId} ")
    ProductType selectById(Integer productTypeId);

    @Update("update t_product_type set product_type_name = #{productTypeName}  where product_type_id = #{productTypeId}")
    int update(ProductType productType);

    int deleteByIds(@Param("idList") List<Integer> idList);

    @Delete("delete from t_product_type where product_type_id = #{id}")
    int deleteById(Integer id);
}